File information: | |
File name: | Process.mesa_Oct77.pdf [preview Process.mesa Oct77] |
Size: | 130 kB |
Extension: | |
Mfg: | xerox |
Model: | Process.mesa Oct77 🔎 |
Original: | Process.mesa Oct77 🔎 |
Descr: | xerox mesa 3.0_1977 listing Process.mesa_Oct77.pdf |
Group: | Electronics > Other |
Uploaded: | 24-12-2019 |
User: | Anonymous |
Multipart: | No multipart |
Information about the files in archive: | ||
Decompress result: | OK | |
Extracted files: | 1 | |
File name Process.mesa_Oct77.pdf process.mESA 24-0CT-77 18:38:25 Page 1 -- File Process.Mesa -- Last edited by Sandman on August 23, 1977 9:49 PM DIRECTORY FrameDefs: FROM "framedefs", InlineDefs: FROM "inlinedefs", SystemDefs: FROM "systemdefs", ControlDefs: FROM "controldefs", ProcessDe fs: FROM "processdefs"; DEFINITIONS FROM InlineDefs, ControlDefs, ProcessDefs; Process: PROGRAM IMPORTS FrameDefs, SystemDefs EXPORTS ProcessDefs SHARES ProcessDefs = BEGIN PVector: POINTER TO ProcessVector ~ PV; PriorityNotAvailable: PUBLIC ERROR = CODE; InvalidPriority: PUBLIC ERROR = CODE; InvalidProcess: PUBLIC ERROR = CODE; ProcessNotScheduled: PUBLIC ERROR = CODE; ValidatePriority: PROCEDURE[p: ProcessPriority] BEGIN IF P = Unscheduled OR p IN [HighestProcessPriority .. LowestProcessPriority] THEN RETURN; ERROR InvalidPriority; END; ValidateProcess: PROCEDURE[p:ProcessHandle] = BEGIN ValidatePriority[p.pn I InvalidPriority =) ERROR InvalidProcess ]; IF p.pn = Unscheduled THEN RETURN; IF PVector[p.pn] # p THEN ERROR InvalidProcess; END; CreateProcessFromFrame: PUBLIC PROCEDURE [frame: FrameHandle. priority: ProcessPriority] RETURNS [p: ProcessHandle] = BEGIN OPEN p.state; ValidatePriority[priority]; IF PVector[priority] # ProcessNIL THEN ERROR PriorityNotAvailable; p~SystemDefs.AllocateHeapNode[SIZE[ProcessObject]]; instbyte"O; IF FrameDefs.Class[frame] = global THEN BEGIN stkptr" 1; stk[O] ~ 0; END ELSE stkptr .. 0; X ~ frame; y ~ 0; p.pn .. priority; IF priority # Unscheduled THEN PVector[priority] ~ p; END: CreateProcessrromProcedure: PUBLIC PROCEDURE [proc: PROCEDURE, priority: ProcessPriorily] RrTURNS [p: Processllandle] = B[GIN OprN p.slale: Val idatePriorily[priority]: IF PVeclor[priorily] # ProcessNIL TIIFN [RROR PriorityNotAvailable: p"SystemDefs.AllocatelleapNode[SIZE[ProcessObject]]: lns lbyLe"O; stkpLr"O; X"proc; y .. O; p.pn"pr iOI' ity; IF pr ior i ty # Unschedul ad TIIrN PVactol'[pr ior i ly]"p; [NO; Oestl'oyProcess: PUBl Ie PRocrDuRr [p: Processllandle] = process.mESA 24-0CT-77 18:38:25 Page 2 BEGIN ValidateProcess[p]; SetProcessPriority[p, Unscheduled]; SystemDefs.FreeHeapNode[p]; END; MakeProcessReady: PUBLIC PROCEDURE [p: ProcessHandle] = BEGIN ValidateProcess[p]; IF p.pn = Unscheduled THEN ERROR ProcessNotScheduled: DisableInterrupts[]; RP~ ~ BITOR[RP~.BITSHIFT[1,p.pn]]; WakeupsWaiting~ ~ BITOR[WakeupsWaiting~,BITSHIFT[1.p.pn]]; EnableInterrupts[]; RETURN END: ActivateProcess: PUBLIC PROCEDURE [p: ProcessHandle] = BEGIN ValidateProcess[p]: IF p.pn = Unscheduled THEN ERROR ProcessNotScheduled: DisableInterrupts(]: AP~ ~ BITOR[AP~.BITSHIFT[1.p.pn]]; ActiveWord~ ~ BITOR[ActiveWord~.BITSHIFT[l.p.pn]]; |
Date | User | Rating | Comment |